entry: always add padding to the allocation
authorCosimo Cecchi <cosimoc@gnome.org>
Mon, 30 Jan 2012 20:23:26 +0000 (15:23 -0500)
committerCosimo Cecchi <cosimoc@gnome.org>
Tue, 31 Jan 2012 15:04:26 +0000 (10:04 -0500)
Even when we don't have a frame. We just ignore the borders in this
case.

gtk/gtkentry.c

index 5c1668b5554dc5e5739a647ec5230649d72f0128..2c8823befb65491c29b52150ad00f738026d8a64 100644 (file)
@@ -3029,15 +3029,15 @@ _gtk_entry_get_borders (GtkEntry *entry,
   GtkEntryPrivate *priv = entry->priv;
   GtkWidget *widget = GTK_WIDGET (entry);
   GtkBorder tmp = { 0, 0, 0, 0 };
+  GtkStyleContext *context;
+
+  context = gtk_widget_get_style_context (widget);
+  gtk_style_context_get_padding (context, 0, &tmp);
 
   if (priv->has_frame)
     {
-      GtkStyleContext *context;
       GtkBorder border;
 
-      context = gtk_widget_get_style_context (widget);
-      gtk_style_context_get_padding (context, 0, &tmp);
-
       gtk_style_context_get_border (context, 0, &border);
       tmp.top += border.top;
       tmp.right += border.right;